﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace SYS.Common
{
   public class Log
    {
        public static void txtLog(string path,string logmsg) {
            path += DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")+".html";
            //File.AppendAllLines(path,new string[]{DateTime.Now.ToString()});
            File.AppendAllLines(path, new string[]{logmsg});
            File.AppendAllLines(path, new string[] { "======================="});
        }

        public static void txtLog(string logmsg)
        {
            string path = HttpContext.Current.Server.MapPath("~/log/");
            txtLog(path,logmsg);
        }
    }
}
